From 6285e1c92fd7d46d65a61a7813709d05d07d6a88 Mon Sep 17 00:00:00 2001 From: Victor Vasiliev Date: Tue, 30 Dec 2008 17:17:16 +0000 Subject: [PATCH] * (bug 14117) Image redirects from the shared repo now show "redirected from" --- RELEASE-NOTES | 1 + includes/ImagePage.php | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 32cd5ae96e..234e5c92b2 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -460,6 +460,7 @@ The following extensions are migrated into MediaWiki 1.14: file extension (e.g. Foo. jpg). * Ensure that all HTML id's begin with a letter as required by XHTML standard * Image moving over an existing file no longer throws a database error +* (bug 14117) Image redirects from the shared repo now show "redirected from" === API changes in 1.14 === diff --git a/includes/ImagePage.php b/includes/ImagePage.php index aa5295e28b..870d7c3338 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -107,6 +107,11 @@ class ImagePage extends Article { $wgOut->setRobotPolicy( 'noindex,nofollow' ); $wgOut->setPageTitle( $this->mTitle->getPrefixedText() ); $this->viewUpdates(); + + # And also show "redirected from" message + $sk = $wgUser->getSkin(); + $redir = $sk->makeKnownLinkObj( $this->mRedirectedFrom, '', 'redirect=no' ); + $wgOut->setSubtitle( wfMsgExt( 'redirectedfrom', array( 'parseinline', 'replaceafter' ), $redir ) ); } # Show shared description, if needed -- 2.20.1